<!DOCTYPE html>
<html>
<head>
    <include file="./public/sty.html"/>
    <style>
        .zclip {
            display: none !important;
        }
        #beizhus{border-left:0px;border-top:0px;border-right:0px;border-bottom:1px }
        .yangshi{border-left:0px;border-top:0px;border-right:0px;border-bottom:1px;}

    </style>
    <style>
        .c-pages{padding:20px 0; text-align: center;}
        .c-pages.tl{text-align: left;}
        .c-pages span{display: inline-block; margin-right: 5px; font-size:12px; height:28px; line-height: 28px;}
        .c-pages span.col{color: #fe344e; font-weight: 600;}
        .c-pages span a{display: inline-block; margin:0 3px; height:28px; line-height: 28px; text-align: center; padding:0 12px; border:1px solid #ccc; text-decoration: none; border-radius: 2px;}
        .c-pages span a:link,.c-pages span a:active,.c-pages span a:visited{color: #333;}
        .c-pages span a:hover{ color: #ff8540; }
        .c-pages span a.active{color: #fff; background: #ff8540;}
        .c-pages  .current{ color: #fff; background: #ff8540; display: inline-block; margin: 0 3px; height: 28px;
            line-height: 28px;
            text-align: center;
            padding: 0 12px;
            text-decoration: none;
            border-radius: 2px;
        }
    </style>
</head>
<body>
<div id="app" class="BetRecord">
    <include file="./public/header.html"/>

    <div class="container pt15 fix" s="[object Object]">
        <div class="slideUser">
            <ul class="sildeSession"><h3><span></span>账号管理</h3>
                <li class=""><a href="{:U('Users/personalInfo')}">个人信息</a></li>
                <li class="curr"><a href="{:U('Users/securityCenter')}">安全中心</a></li>
                <li class=""><a href="{:U('Users/manageBankcard2')}">银行卡管理</a></li>
            </ul>
            <ul class="sildeSession"><h3><span></span>投注管理</h3>
                <li><a href="{:U('Users/BetRecord')}" class="">投注记录</a></li>
                <li><a href="{:U('Users/seekOrder')}" class="">追号记录</a></li>
            </ul>
            <ul class="sildeSession"><h3><span></span>资金管理</h3>
                <li><a href="{:U('Users/BillRecord')}" class="">交易记录</a></li>
                <li class=""><a href="{:U('Users/PLstatement')}">今日盈亏</a></li>
            </ul>
            <ul class="sildeSession">
                <h3><span></span>代理中心</h3>
                <li><a href="{:U('Users/agentIntro')}" class="">代理说明</a></li>
                <li class=""><a href="{:U('Users/agentReport')}">代理报表</a></li>
                <li><a href="{:U('Users/lowerReport')}" class="">下级报表</a></li>
                <li class=""><a href="{:U('Users/manageInvite')}">下级开户</a></li>
                <li><a href="{:U('Users/agentMember')}" class="">会员管理</a></li>
                <li><a href="{:U('Users/agentBetRecord')}" class="">投注明细</a></li>
                <li><a href="{:U('Users/agentBillRecord')}" class="">交易明细</a></li>
            </ul>
            <ul class="sildeSession"><h3><span></span>消息管理</h3>
                <li><a href="{:U('Users/letter')}" class="">站内信</a></li>
                <li><a href="{:U('Users/Notice')}" class="">网站公告</a></li>
            </ul>
        </div>
        <div class="userRight">

        <div class="userRight">
            <div class="userTitle mgb10">下级开户</div>
            <div class="userMain openAgent">
                <div class="newTab">
                    <a href="{:U('Users/manageInvite')}" class="">下级开户</a>
                    <a href="{:U('Users/manageIcode')}" class="curr curr">邀请码管理</a>
                </div>
                <div class="TabLi">
                  <form class="well form-search" method="post" action="{:U('Users/manageIcode')}">
                    <ul class="searchFirst">
                        <li><span>开户类型：</span>
                            <a href="javascript:;" class="userSearch <?php if($leixing=='1'){echo 'active';}; ?>" data-idk="1" onclick="xuanze(this.id)" id="daili">代理</a>
                            <a href="javascript:;" class="userSearch <?php if($leixing=='2'){echo 'active';}; ?>" data-idk="2" onclick="xuanze(this.id)" id="wanjia">玩家</a></li>
                     </ul>
                   </form>
                    <div class="invitationCode">
                        <div class="notContent" style="padding: 100px 0px; display: none;">
                            <div data-v-9f25c8c0="" class="iconLoadingCon" style="transform: scale(0.6);"><img
                                    data-v-9f25c8c0="" data-v-3bf35cfc=""
                                    src="//imagess-google.com/system/mobile/lottery/loadingMobile.gif" alt=""
                                    class="loadingImg"></div>
                        </div>
                        <table width="100%" border="0" margin="0" padding="0" cellspacing="0" cellpadding="0"
                               class="manageInvite">
                            <tr>
                                <th>邀请码</th>
                                <th>注册链接</th>
                                <th>备注</th>
                                <th>生成时间</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            <foreach name="arr" item="v">
                                <input type="hidden" id="idk"  value="{$v.id}">
                                <tr>
                                    <td><input type="text" class="code" value="{$v.code}"> <span class="copybtn">复制</span></td>
                                    <td><input type="text" value="{$v.link}"> <span class="copybtn">复制</span></td>
                                    <td>
                                        <em class="xem" data-ids="{$v.id}" data-zhi="<?php if(trim($v['remarks'])==''){echo '';}else{echo $v['remarks'];}; ?>"><?php if(trim($v['remarks'])==''){echo "未设置";}else{echo $v['remarks'];}; ?></em>
                                    </td>
                                    <td><?php echo date('Y-m-d H:i:s',$v["ctime"]); ?></td>
                                    <td>注册({$v.num})</td>
                                    <td>
                                        <a href="javascript:;" data-ssc="<?php echo sprintf('%.1f',$v['ssc']); ?>"  data-k3="<?php echo sprintf('%.1f',$v['k3']); ?>" data-x11_5="<?php echo sprintf('%.1f',$v['x11_5']); ?>" data-fc3d="<?php echo sprintf('%.1f',$v['fc3d']); ?>" data-pl3_5="<?php echo sprintf('%.1f',$v['pl3_5']); ?>" data-kl8="<?php echo sprintf('%.1f',$v['kl8']); ?>" data-pk10="<?php echo sprintf('%.1f',$v['pk10']); ?>" class="detail">详情</a>
                                        |
                                        <a href="{:U('Users/del_code',array('id'=>$v['id']))}" class="del">删除</a>
                                    </td>
                                </tr>
                            </foreach>
                        </table>
                        <div class="c-pages tc">
                            <span>{$page}第{$p}页/共{$totalpage}页</span>
                        </div>
                        <div class="userTip mg30"><p><i class="iconfont"></i>温馨提示：“邀请码” 与 “注册链接” 功能一致，可以使用邀请码，也可以使用注册链接。
                        </p></div>
                        <div data-v-a961bf6c="" class="_div" style="display: none;">
                            <div data-v-a961bf6c="" class="layerBg"></div>
                            <div data-v-a961bf6c="" class="layerBox">
                                <div data-v-a961bf6c="" type="page" times="4" showtime="0"
                                     contype="string" class="layui-layer layui-layer-page  layer-anim"
                                     style="z-index: 19891018; width: 650px; height: 500px; top: 256.5px; left: 307px;">
                                    <div data-v-a961bf6c="" move="ok" class="layui-layer-title" style="cursor: move;">
                                        详情
                                    </div>
                                    <div data-v-a961bf6c="" class="layui-layer-content" style="height: 450px;">
                                        <div data-v-a961bf6c="" class="bonusTable"
                                             style="padding: 0px;"></div>
                                    </div>
                                    <span data-v-a961bf6c="" class="layui-layer-setwin">
                                        <a data-v-a961bf6c="" href="javascript:;" class="close"></a>
                                    </span>
                                </div>
                            </div>
                        </div>


                        <!--//复制-->
                        <div id="layermbox3" class="layermbox layermbox0 layermshow" index="3">
                            <div class="laymshade"></div>
                            <div class="layermmain">
                                <div class="section">
                                    <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                                        <button class="layermend"></button>
                                        <div class="layermcont"><b style="color:red">已将内容复制到剪切板</b></div>
                                        <div class="layermbtn"><span type="1">确定</span></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--详情-->
                        <div data-v-a961bf6c="" class="_div" style="display:none;">
                            <div data-v-a961bf6c="" class="layerBg"></div>
                            <div data-v-a961bf6c="" class="layerBox">
                                <div data-v-a961bf6c="" id="layui-layer4" type="page" times="4" showtime="0"
                                     contype="string" class="layui-layer layui-layer-page  layer-anim"
                                     style="z-index: 19891018; width: 650px; height: 500px; top: 256.5px; left: 307px;">
                                    <div data-v-a961bf6c="" move="ok" class="layui-layer-title" style="cursor: move;">
                                        详情
                                    </div>
                                    <div data-v-a961bf6c="" class="layui-layer-content" style="height: 450px;">
                                        <div data-v-a961bf6c="" id="Detail" class="bonusTable" style="padding: 0px;">

                                            <ul data-v-a961bf6c="" class="InviteW">
                                                <li data-v-a961bf6c="">时时彩</li>
                                                <li data-v-a961bf6c="">
                                                    <input data-v-a961bf6c="" type="text"  disabled="disabled"  class="userInput mgl20 ssc">&nbsp;
                                                    <span data-v-a961bf6c="">（自身返点：<?php echo sprintf("%.1f",$arr1['ssc']);?>）</span>
                                                </li>
                                            </ul>

                                            <ul data-v-a961bf6c="" class="InviteW">
                                                <li data-v-a961bf6c="">快3</li>
                                                <li data-v-a961bf6c="">
                                                    <input data-v-a961bf6c="" type="text" disabled="disabled" class="userInput mgl20 k3">&nbsp;
                                                    <span data-v-a961bf6c="">（自身返点：<?php echo sprintf("%.1f",$arr1['k3']);?>）</span>
                                                </li>
                                            </ul>
                                            <ul data-v-a961bf6c="" class="InviteW">
                                                <li data-v-a961bf6c="">11选5</li>
                                                <li data-v-a961bf6c="">
                                                    <input data-v-a961bf6c="" type="text" disabled="disabled" class="userInput mgl20 x11_5">&nbsp;
                                                    <span data-v-a961bf6c="">（自身返点：<?php echo sprintf("%.1f",$arr1['x11_5']);?>）</span>
                                                </li>
                                            </ul>
                                            <ul data-v-a961bf6c="" class="InviteW">
                                                <li data-v-a961bf6c="">福彩3D</li>
                                                <li data-v-a961bf6c="">
                                                    <input data-v-a961bf6c="" type="text" disabled="disabled" class="userInput mgl20 fc3d">&nbsp;
                                                    <span data-v-a961bf6c="">（自身返点：<?php echo sprintf("%.1f",$arr1['fc3d']);?>）</span>
                                                </li>
                                            </ul>
                                            <ul data-v-a961bf6c="" class="InviteW">
                                                <li data-v-a961bf6c="">排列3/5</li>
                                                <li data-v-a961bf6c="">
                                                    <input data-v-a961bf6c="" type="text"  disabled="disabled" class="userInput mgl20 pl3_5">&nbsp;
                                                    <span data-v-a961bf6c="">（自身返点：<?php echo sprintf("%.1f",$arr1['pl3_5']);?>）</span>
                                                </li>
                                            </ul>
                                            <ul data-v-a961bf6c="" class="InviteW">
                                                <li data-v-a961bf6c="">北京快乐8</li>
                                                <li data-v-a961bf6c="">
                                                    <input data-v-a961bf6c="" type="text" name="SSC" value="" disabled="disabled" class="userInput mgl20 kl8">&nbsp;
                                                    <span data-v-a961bf6c="">（自身返点：<?php echo sprintf("%.1f",$arr1['kl8']);?>）</span>
                                                </li>
                                            </ul>
                                            <ul data-v-a961bf6c="" class="InviteW">
                                                <li data-v-a961bf6c="">北京PK10</li>
                                                <li data-v-a961bf6c="">
                                                    <input data-v-a961bf6c="" type="text" name="SSC" value="" disabled="disabled" class="userInput mgl20 pk10">&nbsp;
                                                    <span data-v-a961bf6c="">（自身返点：<?php echo sprintf("%.1f",$arr1['pk10']);?>）</span>
                                                </li>
                                            </ul>

                                        </div>
                                    </div>
                                    <span data-v-a961bf6c="" class="layui-layer-setwin">
                                        <a data-v-a961bf6c="" href="javascript:;" class="close"></a>
                                    </span>
                                </div>
                            </div>
                        </div>
                        <!--备注-->
                        <div data-v-2cb2e2ea="" class="_Info" style="display: none;">
                            <input type="hidden" id="ids" value="">
                            <div data-v-2cb2e2ea="" class="layerBg"></div>
                            <div data-v-2cb2e2ea="" class="layerMsg">

                                <div data-v-2cb2e2ea=""
                                     class="layui-layer layui-layer-dialog layui-layer-prompt layer-anim">

                                    <div data-v-2cb2e2ea="" class="layui-layer-title" style="cursor: move;">备注</div>
                                    <div data-v-2cb2e2ea="" id="" class="layui-layer-content">

                                        <input data-v-2cb2e2ea="" type="text" id="values" class="layui-layer-input"
                                               value="{$arr.remarks}">

                                    </div>
                                    <span data-v-2cb2e2ea="" class="layui-layer-setwin">
                                        <a data-v-2cb2e2ea="" href="javascript:;" class="close"></a>
                                    </span>

                                    <div data-v-2cb2e2ea="" class="layui-layer-btn">
                                        <a data-v-2cb2e2ea="" class="layui-layer-btn0">确定</a>
                                        <a data-v-2cb2e2ea="" class="layui-layer-btn1">取消</a>
                                    </div>
                                </div>

                            </div>
                        </div>
                        <!--提示-->
                        <div id="layermbox10" class="layermbox layermbox0 layermshow" index="10">
                            <div class="laymshade"></div>
                            <div class="layermmain">
                                <div class="section">
                                    <div class="layermchild msg layermanim" style="fill:#ececec">
                                           <div class="layermcont" >备注设置为：<input type="text" id="beizhus" ></div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>


    </div>
    <include file="./public/footer.html"/>
</div>
<script src="/style/js/jquery.js"></script>
<script src="/style/js/jquery.zclip.js"></script>
<script src="/style/js/fx.js"></script>
<script>

    //复制到剪切板
    $(".copybtn").click(function(){
        var Url2=$(this).siblings("input");
        Url2.select();
        document.execCommand("Copy");
        $("#layermbox3").show();
    })


    //筛选代理还是玩家
    function xuanze(b){
        var leixing = $("#"+b).attr("data-idk");
        window.location.href="/Users/manageIcode/leixing/"+leixing;
    }


    $(".searchFirst .userSearch").each(function(){
        var len = $(".searchFirst .userSearch.active").length;
        if(len == 0){
            $(".searchFirst .userSearch:first-of-type").addClass("active");
        }
    })
    $(".searchFirst .userSearch").click(function () {
        $(this).addClass("active").siblings(".userSearch").removeClass("active");
    })

    $(".xem").click(function () {
        var zhi = $(this).data("zhi");
        var ids = $(this).data("ids");
        $("._Info .layui-layer-input").val(zhi);
        $("#ids").val(ids);

        $("._Info").show();


    })
    $(".layui-layer-btn0").click(function () {
        var ids = $("#ids").val();
        var beizhu = $(".layui-layer-input").val();
        $("#beizhus").val(beizhu);
        $.ajax({
            type: "POST",
            url: "{:U('Users/remarks')}",
            data: {'beizhu': beizhu,'id':ids},
            success: function (dat) {
                if (dat == '1') {
                    $("#layermbox10").show();
                    setInterval(function(){
                        $("#layermbox10").hide();
                        window.location.href="/Users/manageIcode";
                    },3000);

                }
            }
        });
        $("._Info").hide();
    });


    $(".layui-layer-btn1,.close").click(function () {
        $("._Info").hide();
    });



    $(".detail").click(function () {
        var ssc1 = $(this).data("ssc");
        if(/^\d+$/.test(ssc1))
        {
           var ssc = ssc1+".0";
        }else{
            var ssc = ssc1;
        }
        var k31 = $(this).data("k3");
        if(/^\d+$/.test(k31))
        {
            var k3 = k31+".0";
        }else{
            var k3 = k31;
        }
        var x11_51 = $(this).data("x11_5");
        if(/^\d+$/.test(x11_51))
        {
            var x11_5 = x11_51+".0";
        }else {
            var x11_5 = x11_51;
        }
        var fc3d1 = $(this).data("fc3d");
        if(/^\d+$/.test(fc3d1))
        {
            var fc3d = fc3d1+".0";
        }else{
            var fc3d = fc3d1;
        }
        var pl3_51 = $(this).data("pl3_5");
        if(/^\d+$/.test(pl3_51))
        {
            var pl3_5 = pl3_51+".0";
        }else{
            var pl3_5 = pl3_51;
        }
        var kl81 = $(this).data("kl8");
        if(/^\d+$/.test(kl81))
        {
            var kl8 = kl81+".0";
        }else{
            var kl8 = kl81;
        }
        var pk101 = $(this).data("pk10");
        if(/^\d+$/.test(pk101))
        {
            var pk10 = pk101+".0";
        }else{
            var pk10 = pk101;
        }
        $(".ssc").val(ssc);
        $(".k3").val(k3);
        $(".x11_5").val(x11_5);
        $(".fc3d").val(fc3d);
        $(".pl3_5").val(pl3_5);
        $(".kl8").val(kl8);
        $(".pk10").val(pk10);
        $("#ssc1").val(ssc);
        $("#k31").val(k3);
        $("#x11_51").val(x11_5);
        $("#fc3d1").val(fc3d);
        $("#pl3_51").val(pl3_5);
        $("#kl81").val(kl8);
        $("#pk101").val(pk10);

        $("._div").show();

    });
    $(".close").click(function () {
        $("._div").hide();
    });


</script>
</div>
</body>
</html>